import Login from "@/views/basic/login/index.vue"
import Layout from "@/views/layout/index.vue"
import threePage from "@/views/basic/error/403.vue"
import fourPage from "@/views/basic/error/404.vue"
import fivePage from "@/views/basic/error/500.vue"
import pwdPage from "@/views/basic/account/pwd.vue"
import accountPage from "@/views/basic/account/index.vue"
import menuPage from "@/views/basic/menu/index.vue"
import dashboardPage from "@/views/basic/dashboard.vue"

export default  [
		{
			path: '/login',
			name:'login',
			component: Login,
			meta: { title: '登录'}
		},
		{
			path: '/403',
			name:'403',
			component: threePage,
			meta: { title: '403'}
		},
		{
		    path: '/:catchAll(.*)',
		    name: '/404',
		    component: fourPage,
			meta: { title: '404'}
		},
		{
			path: '/500',
			name:'500',
			component: fivePage,
			meta: { title: '500'}
		},
		{
			path: '/dashboard',
			name:'dashboard',
			component: Layout,
			meta: { title: '首页'},
			children: [
				//模板页面
				{
					path: '/',
				  redirect:'/dashboard'
				},
				//模板页面
				{
					path: '/dashboard',
					component: dashboardPage,
				},
				{
					path: 'pwd',
					name: 'pwd',
					component: pwdPage,
					// 只有经过身份验证的用户才能创建帖子
					meta: {
						requiresAuth: true,
						title: '修改密码',
						pname:'dashboard'
					}
				},
				{
					path: 'account',
					name: 'account',
					component: accountPage,
					// 只有经过身份验证的用户才能创建帖子
					meta: {
						requiresAuth: true,
						title: '账户信息',
						pname:'dashboard'
					}
				}
			]
		}
]